package com.yummy.mapper;

import com.yummy.entity.AddressBook;
import com.yummy.common.CommonMapper;
import com.yummy.entity.Category;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author yinbo
* @description 针对表【address_book(地址管理)】的数据库操作Mapper
* @createDate 2022-08-29 23:07:35
* @Entity com.yummy.entity.AddressBook
*/
@Repository
public interface AddressBookMapper extends CommonMapper<AddressBook> {

	List<AddressBook> selectByUser(Integer userId);

	AddressBook selectDefaultByUser(Integer id);

	int insertAddress(AddressBook addressBook);

	int delAddress(@Param("aid") String... ids);

	int updateDefault(@Param("id") Integer id, @Param("isDefault") Integer isDefault);

	int updateAddress(AddressBook addressBook);

	AddressBook selectAddressById(Integer id);



}
